"""
what？else不是用来判断的吗？

没错，所以他也能用来判断循环是否 正常结束

这可是python独有

那么什么是 正常结束，也就是 循环不是因为触发了 break 而结束
"""

# for i in range(0):
#     continue
# else:
#     print("end")
#
# while 0:
#     ...
# else:
#     print("end")

user_list = [
    "muzhou",
    "muzhou1",
    "muzhou2"
]

user = "muzhou"

# login
# flag = 1
# for username in user_list:
#     if username == user:
#         print("登录成功")
#         flag = 0
#         break
#
# if flag:
#     print("用户不存在")

# for username in user_list:
#     if username == user:
#         print("登录成功")
#         break
# else:
#     print("用户不存在")

# caseList = [1, 2, 3, 4]
#
# result = "error"
#
# if caseList:
#     for case in caseList:
#         if case == 5:
#             break
#     else:
#         result = "success"
#
# print(result)